package org.eiahe.hr.salary.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.salary.domain.BonusPayment;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 奖金发放业务对象 hr_bonus_payment
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BonusPayment.class, reverseConvertGenerate = false)
public class BonusPaymentBo extends BaseEntity {

    /**
     * 奖金发放ID
     */
    @NotNull(message = "奖金发放ID不能为空", groups = { EditGroup.class })
    private Long paymentId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeNo;

    /**
     * 奖金类型
     */
    @NotBlank(message = "奖金类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bonusType;

    /**
     * 奖金金额
     */
    @NotNull(message = "奖金金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal bonusAmount;

    /**
     * 发放时间
     */
    @NotNull(message = "发放时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date paymentTime;

    /**
     * 核算规则
     */
    private String calculationRule;

    /**
     * 核算人
     */
    private String calculator;

    /**
     * 核算时间
     */
    private Date calculationTime;

    /**
     * 发放状态(0未发放 1已发放)
     */
    private String paymentStatus;

    /**
     * 领取状态(0未领取 1已领取)
     */
    private String receiveStatus;

    /**
     * 领取时间
     */
    private Date receiveTime;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}